using System;
using OracleInternal.Common;

namespace Oracle.ManagedDataAccess.Client
{
	public sealed class OracleConnectionOpenEventArgs : EventArgs
	{
		private OracleConnection m_connection;

		public OracleConnection Connection => m_connection;

		internal OracleConnectionOpenEventArgs(OracleConnection connection)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleConnectionOpenEventArgs, OracleTraceFuncName.ctor);
			}
			try
			{
				m_connection = connection;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleConnectionOpenEventArgs, OracleTraceFuncName.ctor);
				}
			}
		}
	}
}
